package com.hotline.communication.enums;

public enum CommDBCode {

    GET_TEL_NUMBER("GetTelNumber","获取值班人员外呼号码");

    /**
     * 编码
     */
    private String code;

    /**
     * 名称
     */
    private String desc;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    CommDBCode(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CommDBCode getCommDBCode(String code){
        for (CommDBCode commDBCode : CommDBCode.values()){
            if(commDBCode.getCode().equals(code)){
                return commDBCode;
            }
        }
        return null;
    }
}
